home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / lib / cryptsetup / checks / swap < prev    next >
Text File  |  2009-10-14  |  202b  |  11 lines

  1. #!/bin/sh
  2.  
  3. ulimit -c 0
  4. if dd if="$1" bs=4k count=1 2>/dev/null | grep -E '(SWAPSPACE2)|(SWAP_SPACE)' >/dev/null; then
  5.   exit 0
  6. else
  7.   echo " - The device $1 is not a valid SWAP partition."
  8.   exit 1
  9. fi
  10.  
  11.